﻿@{
    ViewBag.Title = "Home Page";

    int refreshPeriod = ViewBag.RefreshPeriod; 
}

@*@section featured {
    <section class="featured">
        <div class="content-wrapper">
            <hgroup class="title">
                <h1>@ViewBag.Title.</h1>
                <h2>@ViewBag.Message</h2>
            </hgroup>
             <!-- Add content here -->
        </div>
    </section>
}*@

<style type="text/css">

    /*body {
        font-size: smaller;
    }*/

    td {
        white-space: nowrap;
    }
 
    .control {
        color : red;
    }

    .command {
        color : blue;
    }

    .data {
        color : black;
    }

    .heartbeat {
        color : gray;
    }

</style>

<script src="@Url.Content("~/Scripts/jquery-3.0.0.min.js")" type="text/javascript"></script>

<div id="messages">
    @Html.Partial("_MessagePartial")
</div>

<script type="text/javascript">

    $.ajaxSetup ({
        // Disable caching of AJAX responses
        cache: false
    });

    $(function () {
        setInterval(function () { $('#messages').load('/Message/RefreshMessagePartial'); }, @refreshPeriod.ToString()); // every 3 sec
    });

</script>


